package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 景点门票订单信息对象 order_info
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Data
public class OrderInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private String id;

    /** 关联景点id */
    @Excel(name = "关联景点id")
    private String aid;

    @Excel(name = "订单号")
    private String orderNumber;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date donetime;

    /** 预约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date bookingtime;

    /** 购票数量（至少1张） */
    @Excel(name = "购票数量", readConverterExp = "至=少1张")
    private Long ticketNum;

    /** 订单总价 */
    @Excel(name = "订单总价")
    private BigDecimal price;

    /** 下单用户id */
    @Excel(name = "下单用户id")
    private String uid;

    /** 关联门票id */
    @Excel(name = "关联门票id")
    private String tid;

    /** 订单状态 */
    @Excel(name = "订单状态", readConverterExp = "0==待支付，1=已支付，2=已使用，3=已取消")
    private Long state;

    private String nickName;
    private String phonenumber;
    private String title;
    private BigDecimal ticketPrice; // 对应 ticket.price


    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setAid(String aid) 
    {
        this.aid = aid;
    }

    public String getAid() 
    {
        return aid;
    }

    public void setDonetime(Date donetime) 
    {
        this.donetime = donetime;
    }

    public Date getDonetime() 
    {
        return donetime;
    }

    public void setBookingtime(Date bookingtime) 
    {
        this.bookingtime = bookingtime;
    }

    public Date getBookingtime() 
    {
        return bookingtime;
    }

    public void setTicketNum(Long ticketNum) 
    {
        this.ticketNum = ticketNum;
    }

    public Long getTicketNum() 
    {
        return ticketNum;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setUid(String uid) 
    {
        this.uid = uid;
    }

    public String getUid() 
    {
        return uid;
    }

    public void setTid(String tid) 
    {
        this.tid = tid;
    }

    public String getTid() 
    {
        return tid;
    }

    public void setState(Long state) 
    {
        this.state = state;
    }

    public Long getState() 
    {
        return state;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("aid", getAid())
            .append("donetime", getDonetime())
            .append("bookingtime", getBookingtime())
            .append("ticketNum", getTicketNum())
            .append("price", getPrice())
            .append("uid", getUid())
            .append("tid", getTid())
            .append("state", getState())
            .toString();
    }
}
